Difference between Nested Subqueries and Correlated Subquery? Nested Subqueries Correlated Subquery 1. Subquery is executed first,and its results are 1. Correlated subqueries are the opposite case, where the inserted into Where clause of the main query. main query is executed first and the subquery is executed for every row returned by the main query. 2. Nested Subquery runs only once for the entire 2. Runs once for each row selected by the outer query. nesting. 3. It doesn't contain any reference to the outer 3. It contains a reference to a value from the row selected query row. by the outer query. 4. Select first_name, salary from employees 4. Select first_name, salary from employees e where department_id in (select department_id where department_id in (select d.department_id from departnments); from department d where e.department_id = d.department); 5. Nested subquery follows top-down approach. 5. Correlated subquey follows down to top approach.